package war2100.entity.help;

import java.awt.Image;
import war2100.Prototypes;
import war2100.entity.Map;

public class PlayerStartPos extends BasicHelpEntity {
	private int id;

	public PlayerStartPos(float x, float y, Map map, Prototypes prototypes) {
		super(x, y, false, map, prototypes);
		if (map != null) {
			this.id = map.getCurrentStartpos();
			map.setCurrentStartpos(map.getCurrentStartpos() + 1);
		}
		else
			this.id = 1;
	}

	public PlayerStartPos(Map map, Prototypes prototypes) {
		this(0, 0, map, prototypes);
	}

	public PlayerStartPos(PlayerStartPos e, Map map, Prototypes prototypes) {
		this(e.getX(), e.getY(), map, prototypes);
	}

        @Override
	public void render(org.newdawn.slick.Graphics g, int x, int y, int width, int height) {
		return;
	}
        
        @Override
        public Image getImage() {
            return prototypes.getPlayerStartPos(id);
        }

        @Override
        public org.newdawn.slick.Image getSlickImage() {
            return null;
        }

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
}
